<template>
  <div class="header">
    <div class="header-left">
      <span class="iconfont">&#xe624;</span>
    </div>
    <div class="header-input">
      <span class="iconfont search-icon" >&#xe632;</span>
      输入城市/景点/游玩主题
    </div>
    <router-link to="/city">
      <div class="header-right" >
        {{this.city}}
        <span class="iconfont arrow-icon">&#xe6bd;</span>
      </div>
    </router-link>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'HomeHeader',
  methods: {
    ifclick () {
      console.log('dadad')
      console.log(this.city)
    }
  },
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style scoped lang="stylus">
  /*@import "../../../assets/styles/varibles.styl"*/
  @import "~styles/varibles.styl"
  .header
    height:.86rem
    display:flex
    background: $bgColor
    align-items center
    .header-left
      width:.64rem
      color #ffffff
      font-weight bold
    .header-input
      flex 1
      color gray
      background: #fff
      border-radius 0.1rem
      text-align left
      margin-top: .08rem
      height:.64rem
      line-height .60rem
      margin-left:.2rem
    .search-icon
      margin-left:0.2rem
    .header-right
      min-width 1.04rem
      color: #ffffff
      padding: 0.1rem
    .arrow-icon
      font-size .24rem
</style>
